﻿

<div>
    <form name="caseCategoryCreateOrEditForm" role="form" novalidate class="form-validation">
        <div class="modal-header">
            <h4 class="modal-title">
                <span ng-if="vm.caseCategory.id">编辑信息:{{vm.caseCategory.name}}</span>
                <span ng-if="!vm.caseCategory.id">新增信息</span>
            </h4>
        </div>
        <div class="modal-body">

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <select chosen search_contains="true" name="ParentID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.caseCategory.parentID" ng-disabled="vm.disabled">
                    <option ng-repeat="x in vm.caseCategoryList" value="{{x.value}}" ng-selected="vm.caseCategory.parentID==x.value">{{x.displayText}}</option>
                </select>
                <label>所属父案例</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <input type="text" class="form-control" name="Title" ng-class="{'edited':vm.caseCategory.title}" ng-model="vm.caseCategory.title" maxlength="100" required />
                <label>菜单名称</label>
                <span class="help-block">     @L("Title")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" style="display:none;">
                <input type="text" class="form-control" name="SortID" ng-class="{'edited':vm.caseCategory.sortID}" ng-model="vm.caseCategory.sortID" />
                <label>排序</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <label>内容</label>
                <div class="ueditor" ng-model="vm.caseCategory.content" style="width: 100%;"></div>
            </div>


        </div>
        <div class="modal-footer">
            <button ng-disabled="vm.saving" type="button" class="btn btn-default" ng-click="vm.cancel()">@L("Cancel")</button>
            <button type="submit" button-busy="vm.saving" busy-text="@L("SavingWithThreeDot")" class="btn btn-primary blue" ng-click="vm.save()" ng-disabled="caseCategoryCreateOrEditForm.$invalid"><i class="fa fa-save"></i> <span>@L("Save")</span></button>
        </div>
    </form>
</div>